package com.example.zhengchaojun.arcgis.basicesTest.adapter;

import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.example.zhengchaojun.arcgis.R;
import com.example.zhengchaojun.arcgis.baseadapter.ListViewBaseAdapter;
import com.example.zhengchaojun.arcgis.model.KeyAndValueBean;

import java.util.List;


/**
 * 类描述：显示轨迹的ListView的adapter
 * 作者：郑朝军 on 2017/12/25
 * 邮箱：1250393285@qq.com
 * 公司：武汉智博创享科技有限公司
 * 修改人：郑朝军 on 2017/12/25
 * 修改备注：
 */
public class AttributeAdapter extends ListViewBaseAdapter<KeyAndValueBean>
{
    private View m_view;

    public AttributeAdapter(Activity activity, List<KeyAndValueBean> list)
    {
        super(activity, list);
    }

    public View getView(final int position, View convertView, ViewGroup parent)
    {
        convertView = getItemView(convertView, R.layout.track_listitem_track, parent);

        final TextView tv_text = getView(convertView, R.id.tv_text);
        tv_text.setTextSize(10);

        final KeyAndValueBean track = getItem(position);
        tv_text.setText(track.getKey() + "," + track.getValue());

        return convertView;
    }
}
